package com.bwie.utils;

import java.io.Serializable;

/**
 * @Author:Max
 * @Date: 2024/8/9 19:00
 * @Description
 **/
public class Rusult1 implements Serializable {
    public int code;
    private String msg;
    private Object data;


    public static Rusult1 ok(){
        Rusult1 rusult1 = new Rusult1();
        rusult1.setCode(200);
        rusult1.setMsg("操作成功");
         rusult1.setData(null);
         return rusult1;
    }

    public static Rusult1 error(){
        Rusult1 rusult1 = new Rusult1();
        rusult1.setCode(500);
        rusult1.setMsg("操作失败");
         rusult1.setData(null);
         return rusult1;
    }

    public int getCode() {
        return code;
    }

    public Rusult1 setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public Rusult1 setMsg(String msg) {
        this.msg = msg;

        return this;
    }

    public Object getData() {
        return data;
    }

    public Rusult1 setData(Object data) {
        this.data = data;
        return this;
    }
}
